package com.fuxi.cloud.desreport.dao;

import com.fuxi.cloud.common.vo.JmDictModel;
import com.fuxi.cloud.desreport.entity.JimuReportDict;
import org.jeecgframework.minidao.annotation.Param;
import org.jeecgframework.minidao.annotation.ResultType;
import org.jeecgframework.minidao.annotation.Sql;
import org.jeecgframework.minidao.pojo.MiniDaoPage;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * JimuReportDictDao
 *
 * @Author: 扫地僧
 * @CreateTime: 2021-05-03
 */
@Repository
public interface JimuReportDictDao {
    @Sql("SELECT * FROM kunlun_sys_dict WHERE ID = :id")
    JimuReportDict get(@Param("id") String var1);

    int update(@Param("reportDict") JimuReportDict var1);

    void insert(@Param("reportDict") JimuReportDict var1);

    @ResultType(JimuReportDict.class)
    MiniDaoPage<JimuReportDict> getAll(@Param("reportDict") JimuReportDict var1, @Param("page") int var2, @Param("rows") int var3);

    @Sql("DELETE from kunlun_sys_dict WHERE ID = :id")
    void delete(@Param("id") String var1);

    @Sql("DELETE from kunlun_sys_dict WHERE ID = :id")
    void deleteById(@Param("id") String var1);

    @Sql("select count(*) from kunlun_sys_dict where dict_code = :dictCode")
    Integer getDictCount(@Param("dictCode") String var1);

    @Sql("update kunlun_sys_dict set del_flag= :delFlag where id= :id")
    Integer updateDictDelFlag(@Param("delFlag") Integer var1, @Param("id") String var2);

    @Sql("update kunlun_sys_dict set del_flag=1 where id in(:ids)")
    void updateDelFlagByIds(@Param("ids") String var1);

    @ResultType(JimuReportDict.class)
    List<JimuReportDict> queryDeleteList(@Param("username") String var1);

    @Sql("select count(*) from kunlun_sys_dict where dict_code= :dictCode and id!= :id")
    Integer getEditDictCount(@Param("dictCode") String var1, @Param("id") String var2);

    @ResultType(JmDictModel.class)
    List<JmDictModel> queryDictItemsByCode(@Param("code") String var1);

    @ResultType(String.class)
    String queryDictTextByKey(@Param("code") String var1, @Param("key") String var2);
}

